package helper.scxml.scxml2.t0.case2_traffic.zone.ts

import helper.base.debug.DebugHelper.DebuggerList.Companion.makeDebuggerList
import helper.base.debug.DebugRes.d_randomRun_runResult
import helper.base.debug.DebugRes.d_t_pT1Calculate_path
import helper.scxml.scxml2.t0.case2_traffic.zone.TrafficEnvHelper.StrategyObj.Ren.aUniformRenStrategy
import helper.scxml.scxml2.t0.case2_traffic.zone.TrafficEnvHelper.StrategyObj.getT1EnvStrategy
import helper.scxml.scxml2.t0.case2_traffic.zone.ts.T0Helper.TaskUnit.Companion.getTaskUnit
import helper.scxml.strategy.sNodeUnit.T2SNodeUnitHelper.ERT2SNodeUnit.Companion.makeL0ERT2SNodeUnit
import helper.scxml.strategy.sNodeUnit.T2SNodeUnitHelper.T2SNodeUnit
import org.junit.Test

internal class T4_uniform {
    //均匀随机
    fun getT4T2SNodeUnit(): T2SNodeUnit {
        return makeL0ERT2SNodeUnit(
            env = getT1EnvStrategy(),
            ren = aUniformRenStrategy,
        )
    }

    private val taskUnit = getTaskUnit(getT4T2SNodeUnit())

    @Test
    fun t1() {
        taskUnit.repeatRandomRun(
            1000,
            makeDebuggerList(
                d_randomRun_runResult,
            ),
        )
        //repeatTimes = 100000
        //average t = 39.3966
    }

    //爆
    @Test
    fun t3() {
        taskUnit.t1Cal(
            debuggerList = makeDebuggerList(
                d_t_pT1Calculate_path,
            )
        )
    }
}